﻿// --------------------------------------------------------------------------------------
// 	文 件 名: ImtSysManage.cs
// --------------------------------------------------------------------------------------
// 	创建时间: 2021/12/08
// 	版　　本: Version:  1.0.0
// 	版    权: Copyright (C) 2016 - 2021 NUCTECH All Rights Reserved
// 	作    者: chenyu
// --------------------------------------------------------------------------------------
// 	说    明: MTS - ImtSysManage。
// --------------------------------------------------------------------------------------
// 	修改历史:
// 			日期							改动
//		2021.12.08						  创建模块
// --------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using SH;
namespace MTS
{
	public interface ImtSysManageCallback
		: ImtCallback
	{
		const int _classID = 8701;
		const string _interfaceName = "mtSysManageCallback";

		const int SysManageRemoteStationOnline = 1;
		const int SysManageRemoteStationOffline = 2;
		const int SysManageRemoteStationConnected = 3;
		const int SysManageRemoteStationDisConnected = 4;
		const int SysManageUpdateCredential = 5;

		const int SysManageStatusChange = 10;
		const int SysManageRunStatusChange = 11;
		const int SysManageGetCredential = 12;
		const int SysManageStationStatusNotify = 13;

		const int SysManagePublishGWorkFlowTask = 14;
		const int SysManageUpdateGWorkFlowTask = 15;
		const int SysManageCancleGWorkFlowTask = 16;
		const int SysManagePublishGSystemStatus = 17;

		const int SysManageNotifyImageInfo = 20;

		[mtFuncID("SysManageRemoteStationOnline", SysManageRemoteStationOnline)]
		shErrorCode OnRemoteStationOnline(mtStationInfo info);

		[mtFuncID("SysManageRemoteStationOffline", SysManageRemoteStationOffline)]
		shErrorCode OnRemoteStationOffline(mtStationInfo info);

		[mtFuncID("SysManageRemoteStationConnected", SysManageRemoteStationConnected)]
		shErrorCode OnRemoteStationConnected(mtStationInfo info);
		[mtFuncID("SysManageRemoteStationDisConnected", SysManageRemoteStationDisConnected)]
		shErrorCode OnRemoteStationDisConnected(mtStationInfo info);

		[mtFuncID("SysManageUpdateCredential", SysManageUpdateCredential)]
		shErrorCode OnUpdateCredential(mtCredential crd);

		[mtFuncID("SysManageStatusChange", SysManageStatusChange)]
		shErrorCode OnStatusChange(ulong sc);
		[mtFuncID("SysManageRunStatusChange", SysManageRunStatusChange)]
		shErrorCode OnRunStatusChange(uint status);
		[mtFuncID("SysManageStationStatusNotify", SysManageStationStatusNotify)]
		shErrorCode OnStationStatusNotify(mtStationStatus stationStatus);

		//发布新的工作流任务
		[mtFuncID("SysManagePublishGWorkFlowTask", SysManagePublishGWorkFlowTask)]
		shErrorCode OnPublishGWorkFlowTask(mtGWFTask wfTask);
		//更新工作流任务
		[mtFuncID("SysManageUpdateGWorkFlowTask", SysManageUpdateGWorkFlowTask)]
		shErrorCode OnUpdateGWorkFlowTask(mtGWFTask wfTask);
		//取消工作流任务
		[mtFuncID("SysManageCancleGWorkFlowTask", SysManageCancleGWorkFlowTask)]
		shErrorCode OnCancleGWorkFlowTask(mtGWFTask wfTask);
		//某个分系统的状态
		[mtFuncID("SysManagePublishGSystemStatus", SysManagePublishGSystemStatus)]
		shErrorCode OnGSystemStatus(mtGSystemStatus wfSystemStatus);
	}

	public interface ImtSysManage : Imt
	{
		public shErrorCode Start();

		public shErrorCode Stop();

		public shErrorCode LogOn(string userName, string password);

		public shErrorCode LogOut();

		public shErrorCode GetCredential(out mtCredential crd);

		public shErrorCode GetCredential(string uuid, out mtCredential crd);

		public uint GetRunStatus(); //下一版废弃

		public shErrorCode GetResourceString( string lang,  List<uint> vecrId, out List<string> vecResource);

		//public shErrorCode GetStatusString(uint sc, out string strStatus) ;//下一版废弃

		// shErrorCode GetInspectWorkMode(std::vector<mtInspectWorkMode> vecWorkMode) ; //废弃

		public shErrorCode EventNotify(uint nRank, uint nEventId, uint nEventSubId, string describe);

		// add by tangyetao 2020/07/09  新的操作日志接口
		public shErrorCode OperationLogNotify(uint nRank, uint nEventId, uint nEventSubId, mtOperationInfo operationInfo);

		public shErrorCode ErrorNotify(shErrorCode nErrorCode);

		public shErrorCode StatusNotify(uint nStatusCode);

		public shErrorCode GetLastError();

		//通知运行状态，老接口废弃。
		public shErrorCode GStationRunStatusNotify(mtGStationRunStatusInfo info);

		public shErrorCode GetGSystemRunStatus(out mtGSystemStatus info);

		//通知任务过程信息信息。汇报任务进展情况。
		public shErrorCode GWFTaskProcessInfoNotify(mtGWFTaskProcessInfo info);
	}
}
